/**
 * @Title: TestCollection.java
 * @Package com.yywz.collection
 * @Description: TODO
 * @author Nick
 * @date Jul 27, 2012 11:03:55 PM
 * @version V1.0
 */
package com.yywz.collection;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class TestCollection {

	public static void main(String[] args) {
		List<String> list = new ArrayList<String>();
		list.add("a");
		list.add("b");
		Iterator it = list.iterator();
//		while (it.hasNext()) {
//			System.out.println(it.next());
//		}
		
		
		Set set =  new HashSet();
		Iterator setIt = set.iterator();
		
		Map map = new HashMap();
		map.put("aa", "aa");
		map.put("bb", "bb");
		Iterator mapIt = map.entrySet().iterator();
		
		while (mapIt.hasNext()) {
			Map.Entry entry = (Entry) mapIt.next();
			
			System.out.println(entry.getKey() +" " +entry.getValue());
		}
		
	}

}
